package com.dai.zhenfujin.issue.activity.room;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.dai.zhenfujin.R;
import com.dai.zhenfujin.base.BaseActivity;

/*
合租
 */
public class JointRentActivity extends BaseActivity implements View.OnClickListener{

    private EditText etName,etRent,etBedroom,etHouseType,etAcreage,etOrientation,etFloor,etConfiguration;

    private TextView tvEntireTenancy,tvJointRent,tvFaceSouth,tvElevator;
    private TextView tvRefinedDecoration,tvMetro,tvSoutheast,tvFaceNorth;
    private TextView tvNorthAndSouth,tv10,tv11;

    private ImageView ivProductPicture;


    private TextView tvMenAndWoment ,tvGirls,tvBoy;

    private TextView tvTitle;
    private ImageView imageView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_joint_rent);
        initView();
        initListener();
    }


    private void initListener() {


        tvEntireTenancy.setOnClickListener(this);
        tvJointRent.setOnClickListener(this);
        tvFaceSouth.setOnClickListener(this);
        tvElevator.setOnClickListener(this);
        tvRefinedDecoration.setOnClickListener(this);
        tvMetro.setOnClickListener(this);
        tvSoutheast.setOnClickListener(this);
        tvFaceNorth.setOnClickListener(this);
        tvNorthAndSouth.setOnClickListener(this);
        tvMenAndWoment.setOnClickListener(this);
        tvGirls.setOnClickListener(this);
        tvBoy.setOnClickListener(this);

    }

    private void initView() {

        tvTitle = findViewById(R.id.title_textview);
        tvTitle.setText("发布产品");
        imageView = findViewById(R.id.title_imageview);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        etName = findViewById(R.id.issue_jr_et_name);//小区名称
        etRent = findViewById(R.id.issue_jr_et_rent);//租金
        etBedroom = findViewById(R.id.issue_jr_et_bedroom);//卧室类型
        etHouseType = findViewById(R.id.issue_jr_et_house_type);//户型
        etAcreage = findViewById(R.id.issue_jr_et_acreage);//卧室面积
        etOrientation = findViewById(R.id.issue_jr_et_orientation);//卧室朝向
        etFloor = findViewById(R.id.issue_jr_et_floor);//楼层
        etConfiguration= findViewById(R.id.issue_jr_et_configuration);//房屋配置

        ivProductPicture= findViewById(R.id.issue_jr_iv_product_picture);//产品图

        tvEntireTenancy = findViewById(R.id.product_launch_pl_tv1);
        tvJointRent= findViewById(R.id.product_launch_pl_tv2);
        tvFaceSouth= findViewById(R.id.product_launch_pl_tv3);
        tvElevator= findViewById(R.id.product_launch_pl_tv4);
        tvRefinedDecoration= findViewById(R.id.product_launch_pl_tv5);
        tvMetro= findViewById(R.id.product_launch_pl_tv6);
        tvSoutheast= findViewById(R.id.product_launch_pl_tv7);
        tvFaceNorth= findViewById(R.id.product_launch_pl_tv8);
        tvNorthAndSouth= findViewById(R.id.product_launch_pl_tv9);
        tv10= findViewById(R.id.product_launch_pl_tv10);
        tv10.setVisibility(View.INVISIBLE);
        tv11= findViewById(R.id.product_launch_pl_tv11);
        tv11.setVisibility(View.INVISIBLE);


        tvEntireTenancy.setText("整租");
        tvJointRent.setText("合租");
        tvFaceSouth.setText("朝南");
        tvElevator.setText("有电梯");
        tvRefinedDecoration.setText("精装修");
        tvMetro.setText("近地铁");
        tvSoutheast.setText("东南");
        tvFaceNorth.setText("朝北");
        tvNorthAndSouth.setText("南北");



        tvMenAndWoment = findViewById(R.id.issue_jr_tv1) ;
        tvGirls= findViewById(R.id.issue_jr_tv2) ;
        tvBoy= findViewById(R.id.issue_jr_tv3) ;


    }
    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.product_launch_pl_tv1://整租
                break;
            case R.id.product_launch_pl_tv2://合租
                break;
            case R.id.product_launch_pl_tv3://朝南
                break;
            case R.id.product_launch_pl_tv4://  有电梯
                break;
            case R.id.product_launch_pl_tv5://精装修
                break;
            case R.id.product_launch_pl_tv6://近地铁
                break;
            case R.id.product_launch_pl_tv7:// 东南
                break;
            case R.id.product_launch_pl_tv8://朝北
                break;
            case R.id.product_launch_pl_tv9:// 南北
                break;

            case R.id.issue_jr_tv1://男女不限
                break;
            case R.id.issue_jr_tv2:// 限女生
                break;
            case R.id.issue_jr_tv3:// 限女生
                break;
        }
    }
}
